/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package freechoicepn;

import freechoicepn.pflow.PflowLoader;
import freechoicepn.pflow.PflowMiner;
import freechoicepn.test.FreeChoice;
import java.awt.Choice;
import java.util.Scanner;

/**
 *
 * @author Tomas
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        
        System.out.println("FreeChoice PN");
        System.out.println("-------------");
      
        Scanner scanner = new Scanner(System.in);
        char choice;
        
        do {
            System.out.println("Zadajte cestu k pflow suboru na otestovanie:");
            String pflowPath = scanner.nextLine();

            PflowLoader loader = new PflowLoader(pflowPath);
            PflowMiner miner = new PflowMiner(loader);

            if (FreeChoice.Test(miner.getPlaces()))
                System.out.println("Vasa PN siet je typu Free-choice");
            else
                System.out.println("Vasa PN siet nie je typu Free-choice");
            
            System.out.println("Chcete otestovat dalsi subor? [a/n]");
            choice = scanner.nextLine().toLowerCase().charAt(0);
        } while(choice != 'n');
        System.out.println("Dovidenia");
        scanner.nextLine();
    }
}
